The Movie Toolbox includes support for progressive downloads, which allow part of a movie to be displayed before all of its data has been received over a network or other slow link. Applications that use the movie controller component provided by Apple automatically get support for progressive downloads. Applications that do not use the standard move controller can use the two high-level functions for progressive downloads described in this section, QTMovieNeedsTimeTable and GetMaxLoadedTimeInMovie , to determine whether a movie is being progressively downloaded and, if so, to see how much of it has already been downloaded.
When a movie is being progressively downloaded, the GetMaxLoadedTimeInMovie function returns the duration of the part of a movie that has already been downloaded.
pascal OSErr GetMaxLoadedTimeInMovie (Movie theMovie,
TimeValue *time);
If all of a movie has been downloaded, the GetMaxLoadedTimeInMovie function returns the duration of the entire movie.
The toolbox creates a time table for a movie when either QTMovieNeedsTimeTable or GetMaxLoadedTimeInMovie is called for the movie, but the time table is used only by the toolbox and is not accessible to applications. The toolbox disposes of the time table when the download is complete.
The QTMovieNeedsTimeTable function returns whether a movie is being progressively downloaded.
pascal OSErr QTMovieNeedsTimeTable (Movie theMovie,
Boolean *needsTimeTable);
A movie can be progressively downloaded when its data is received over a network connection or other slow data channel. Progressive downloads are not necessary when the data for the movie is on a local disk.
The toolbox creates a time table for a movie when either QTMovieNeedsTimeTable or GetMaxLoadedTimeInMovie is called for the movie, but the time table is used only by the toolbox and is not accessible to applications. The toolbox disposes of the time table when the download is complete.
| Previous | Chapter Contents | Chapter Top | Next |